<?

/**
* We extract the passed string and jobId
*
*/
if($_SESSION["modify_mode"] == "Y"){
  
  
}else{
  
  
}

echo  "<table border='1' class='dedeq'>\n".
      "<th> NO          </th>\n".
      "<th> MODEL       </th>\n".
      "<th> QTY         </th>\n".
      "<th> SER_NUMBER  </th>\n".
      "<th> REASON      </th>\n";
      
for($iRow = 0; $iRow < $_SESSION["init_num"]; $iRow++){
  
  $propModel = $CJs->jsOnFocus("getModel(\"modelEnt[".$iRow."]\");");
  
  
  if($_POST["modelEnt"][$iRow]){
    
    $thisList = array($_POST["modelEnt"][$iRow]);
  }else{
    
    $thisList = array("");
  }
  
  $theModel = $CHtml->formDropDown("modelEnt[".$iRow."]",
                                   $_POST["modelEnt"][$iRow],
                                   $thisList,
                                   $propModel);
  
  /*$propSerNumber = $CJs->jsOnBlur("processSerNumber(\"modelEnt[".$iRow."]\",
                                                    \"modelIdEnt[".$iRow."]\",
                                                    \"srcDateEnt[".$iRow."]\",
                                                    \"srcRefEnt[".$iRow."]\",
                                                    \"srcNoEnt[".$iRow."]\",
                                                    \"serNumEnt[".$iRow."]\");");*/
  
  echo  "<tr>\n". 
  
          "<td> ".($iRow + 1)." </td>\n".
          
          "<td> ".$theModel." </td>\n".
          
          "<td> ".$CHtml->formInput("qtyEnt[".$iRow."]",
                                    $_POST["qtyEnt"][$iRow],
                                    $propQuantity.
                                    $numStyleSz5)." </td>\n".
          
          "<td> <table class='dedeq' >\n".
                
                "<tr>\n".
                  
                  "<td> ".$CHtml->formInput("serNumEnt[".$iRow."]",
                                            $_POST["serNumEnt"][$iRow],
                                            $propSerNumber)." </td>\n".
                  
                  "<td> ".$CHtml->actionIcon("miniInput",
                                             "miniInput[".$iRow."]",
                                             15,
                                             15,
                                             "/ecs/images/modify.png",
                                             "miniInput(\"".$_SERVER["HTTP_HOST"]."\",
                                                        \"qtyEnt[".$iRow."]\",
                                                        \"serNumEnt[".$iRow."]\",
                                                        \"".($iRow + 1)."\",
                                                        \"-1\")")." </td>\n". /* -1 is default number           */
                                                                              /* when sub detail is not exists  */
                  "<td> ".$CHtml->actionIcon("miniView",
                                             "miniView[".$iRow."]",
                                             15,
                                             15,
                                             "/ecs/images/view.png",
                                             "miniView(\"".$_SERVER["HTTP_HOST"]."\",
                                                       \"serNumEnt[".$iRow."]\",
                                                       \"".($iRow + 1)."\",
                                                       \"-1\")")." </td>\n".
    
                "</tr>\n".
                "</table> </td>\n".
          
          "<td> ".$CHtml->formInput("reasonEnt[".$iRow."]",
                                    $_POST["reasonEnt"][$iRow],
                                    $propReason)." </td>\n".
          
        "</tr>\n";
}

echo  "</table>\n";
      
echo  $CHtml->formInputButton( "Entry-data",
                               "entry",
                               "Entry-data",
                               $stlButton).
			$CHtml->formInputButton( "Add-row",
                               "addrow",
                               "Add-row",
                               $stlButton).
      $CHtml->formInputButton( "Drop-row",
                               "droprow",
                               "Drop-row",
                               $stlButton).
    	"</form>\n ".
    	"</body>\n";
    	
?>